package com.ay277.htqoa.base.entity;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 创建时间，最后一次修改时间，创建人，最后一次修改人
 * Created by accp09 on 2016/12/7.
 */
@MappedSuperclass
public class BaseEntity extends IDEntity{
    private User user;
    private Date createTime;
    private Date updateTime;
    private User createUser;
    private User updateUser;
    @ManyToOne
    @JoinColumn(name = "createUser_id")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getCreateUser() {
        return createUser;
    }

    public void setCreateUser(User createUser) {
        this.createUser = createUser;
    }
    @ManyToOne
    @JoinColumn(name = "updateUser_id")
    public User getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(User updateUser) {
        this.updateUser = updateUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}